package com.risesoftware.battlebugs;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import android.app.Activity;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;

public class BattlebugsActivity extends BattleShip {


   /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.game_bottom);

   }


   private void startNewGame() {
      resetBoard();
      
      Iterator<Integer> iBoat = boats.iterator();
      while (iBoat.hasNext()) {
         int paul = iBoat.next();
         Resources res = getResources();
         String addBoatRes = res.getString(R.string.add_boat_to_board);
         String addBoat = String.format(addBoatRes, paul);
         
      }
   }


   @Override
   public boolean onCreateOptionsMenu(Menu menu) {
      MenuInflater inflater = getMenuInflater();
      inflater.inflate(R.menu.bottom_game_options_menu, menu);
      return true;
   }


   @Override
   public boolean onOptionsItemSelected(MenuItem item) {
      // Handle item selection
      switch (item.getItemId()) {
         case R.id.gameNew:
            startNewGame();
            return true;

         case R.id.gameRestart:
            return true;

         case R.id.gameGiveUp:
            return true;

         default:
            return super.onOptionsItemSelected(item);
      }
   }
}